import tkinter
from tkinter import ttk
class MainWindow:
    def __init__(self):
        self.root = tkinter.Tk()
        self.root.minsize(500,500)
        self.root.geometry('500x500+500+300')
        self.menu()

    def menu(self):
        self.root.option_add('*tearOff', False)
        self.menu1 = tkinter.Menu(self.root)
        menu_file = tkinter.Menu(self.menu1)
        self.menu1.add_cascade(menu = menu_file, label="file")
        menu_file.add_command(label = "command",command = self.mingling)
        self.root.configure(menu=self.menu1)
    def mingling(self):
        print("我超勇的啦")
    def start(self):
        self.root.mainloop()


mw = MainWindow()
mw.start()